home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / fsort10.zip / FSORT.DOC next >
Text File  |  1993-04-10  |  27KB  |  586 lines

  1.  
  2.  
  3.  
  4.                                   FSORT Ver. 1.0
  5.                           Copyright (c) 1993 Mike Albert
  6.                                     April 1993
  7.  
  8.  
  9.  
  10.      1   INTRODUCTION
  11.  
  12.      FSORT reads data from an input file, sorts it, and writes it to an
  13.      output file.  Sorting rearranges the lines of the file so that the keys
  14.      of the lines are in a specified order.  FSORT is similar to the MS-DOS
  15.      sort command and provides the following benefits:
  16.  
  17.          o   FSORT is faster than other sort programs, and MUCH faster than
  18.              the MS-DOS sort command.
  19.  
  20.          o   FSORT sorts any size file.
  21.  
  22.          o   FSORT is careful in it's use of disk space, so that files can be
  23.              sorted successfully even when there's little space available.
  24.  
  25.          o   FSORT can handle any number of sort keys, sort in ascending or
  26.              descending order, and ignore the case (upper/lower) of letters.
  27.  
  28.          o   FSORT can sort using character or numeric keys.
  29.  
  30.          o   FSORT can remove duplicate lines.
  31.  
  32.  
  33.      FSORT runs on any IBM-compatible computer using MS-DOS 3.00 or later,
  34.      and uses whatever memory is available.  At least 150K is needed, but
  35.      more results in faster sorting.  The file to be sorted must be stored in
  36.      the MS-DOS text file format, and may reside on floppy diskettes, hard
  37.      disks, RAM disks, or network drives.
  38.  
  39.      If you want to try out FSORT right now, just run FSORT with no command
  40.      line arguments.  FSORT will display a brief description of its operation
  41.      that you can use to get started.
  42.  
  43.  
  44.  
  45.      2   OPERATION
  46.  
  47.      You control FSORT with command line arguments that specify the input
  48.      file, output file, and sorting options.  The arguments may be specified
  49.      in any order.  FSORT is invoked like this:
  50.  
  51.          fsort  [options]  [<] infile  [>] outfile
  52.  
  53.      The options are:
  54.  
  55.          OPTION  EFFECT
  56.  
  57.          /+n     Sort in ascending order using the key starting at column n
  58.  
  59.          /-n     like /+n, only sort in descending order
  60.  
  61.          /+n:m   like /+n, only the key length is m
  62.  
  63.          /+Nn    like /+n, only treat key as a decimal number
  64.  
  65.  
  66.                                        - 1 -
  67.  
  68.  
  69.          /C      ignore differences between upper and lower case letters
  70.  
  71.          /U      discard lines that have duplicate keys
  72.  
  73.          /T      trace sort operations
  74.  
  75.  
  76.      These sort key forms can be combined, e.g. /-N5:6 can be used to sort a
  77.      fixed length numeric key.  For more details, see the Operational Details
  78.      section below.
  79.  
  80.      The first file name identifies the input file that contains the lines to
  81.      be sorted.  The second file name identifies the output file, which will
  82.      contain the contents of the input file reordered by FSORT.  File names
  83.      can include names with or without paths in the standard MS-DOS format,
  84.      but wild-card characters ("*" and "?") aren't permitted.  The MS-DOS
  85.      input redirection operator ("<") may be used for the input file, and the
  86.      output redirection operator (">") may be used for the output file.  The
  87.      pipe operator ("|") may also be used for either input or output.  If no
  88.      output file is specified, the output is displayed on the screen.
  89.  
  90.      The /U option removes lines that have duplicate keys from the output
  91.      file.  The keys must be exactly the same to be removed (unless the /C,
  92.      /+N, or /-N option is specified); e.g. if one key has a trailing space
  93.      at the end and another doesn't, neither line will be removed.  Lines
  94.      that have no key (i.e. a 10-character line with a key starting in column
  95.      20) are also removed.
  96.  
  97.      The /C option makes FSORT ignore case (i.e. upper case vs. lower case
  98.      letters) when comparing keys.  This affects both the sort order and the
  99.      removal of lines with duplicate keys.
  100.  
  101.      The /T option makes FSORT display status information as it sorts.  You
  102.      can use this option to help understand how FSORT works, or to determine
  103.      what's happening when an error occurs.
  104.  
  105.      FSORT sometimes creates temporary work files while it's working, and
  106.      then deletes them when it's finished.  FSORT examines the FSTEMP
  107.      environment variable to determine the drive and directory to use for
  108.      these files.  You can specify multiple locations by separating each path
  109.      with a semicolon.  E.g. to direct FSORT to use the TEMP directory of the
  110.      E: drive, and then (if more space is needed) the root directory on the
  111.      D: drive, enter the command:
  112.  
  113.              set FSTEMP=E:\TEMP;D:\
  114.  
  115.      before running FSORT.  If FSORT can't create and read a file in a
  116.      directory specified in the environment variable, it will terminate when
  117.      it tries to use that directory.  If FSORT doesn't find FSTEMP, it looks
  118.      for the TEMP or TMP variables.  If these aren't found (or if the disks
  119.      specified don't have enough space), FSORT uses the root directory of the
  120.      hard or network disks on your system as needed.  Note that it's not
  121.      necessary to specify these environment variables, but it's useful when
  122.      you want FSORT to use the fastest drive available.
  123.  
  124.      If you want to interrupt FSORT at any time press Ctrl-C or Ctrl-Break.
  125.      Any work files and partially written output files will be deleted.
  126.  
  127.  
  128.  
  129.  
  130.  
  131.                                       - 2 -
  132.  
  133.  
  134.      Sorting large files can be time consuming.  You can maximize the sort
  135.      speed by doing the following:
  136.  
  137.          o   Specify a RAM disk for your temporary work files.  If you can't
  138.              use a RAM disk, use the fastest disk available.
  139.  
  140.          o   Run FSORT with plenty of memory.  The more memory available, the
  141.              faster FSORT runs.  Providing more memory reduces or even
  142.              eliminates the need for work files, and consequently speeds up
  143.              the sort.
  144.  
  145.          o   If you're sorting large files, run FSORT with plenty of file
  146.              handles.  (The number of file handles controls the number of
  147.              files that can be open at one time.)  You can increase the total
  148.              number of file handles by increasing the value specified in the
  149.              FILES statement in your CONFIG.SYS file.  You can prevent other
  150.              programs from taking file handles by running FSORT with no other
  151.              programs (e.g. MS Windows or a TSR that access files) active at
  152.              the same time.
  153.  
  154.          o   Avoid numeric keys when you can.  Numeric keys take more time to
  155.              process.
  156.  
  157.          o   Use as few keys as possible.  The more keys you specify, the
  158.              slower the sort.
  159.  
  160.          o   Don't use the /C option unless you really need it, because it
  161.              makes FSORT run more slowly.
  162.  
  163.  
  164.      You may find that FSORT is unable to sort a file because of insufficient
  165.      disk space.  If you specify the same file name for both the input and
  166.      output file, FSORT will write the output file over the input file.  This
  167.      lets you sort files that otherwise would be too large to process, but it
  168.      does incur the risk of loosing your file.  FSORT will not delete the
  169.      input file until it has fully read it, so if it then finishes
  170.      successfully, you will have no problem.  But if something goes wrong,
  171.      you could loose your file!  I've done what I can to ensure that this
  172.      won't occur, but there are no guarantees.  The choice is yours.
  173.  
  174.      By the way, don't ever specify the same input and output file names when
  175.      using redirection (i.e. the "<" and ">" operators).  If you do, MS-DOS
  176.      will destroy your file (unless it's very short) before FSORT can read
  177.      it!
  178.  
  179.      Here are some examples of FSORT use:
  180.  
  181.                    fsort  test.in  test.out
  182.  
  183.          The contents of file test.in is sorted and written to file test.out.
  184.          The file is sorted in ascending order, using the whole line as the
  185.          sort key.
  186.  
  187.  
  188.                    fsort  /+5  <a:\mp\data.in  >a:\wp\data.out
  189.  
  190.          The contents of file a:\mp\test.in is sorted and written to file
  191.          a:\wp\test.out.  The file is sorted in ascending order, using the
  192.          key starting in the 5th character of each line.
  193.  
  194.  
  195.  
  196.                                       - 3 -
  197.  
  198.  
  199.                    dir | fsort  /+N13:10
  200.  
  201.          The output from the MS-DOS dir command is sorted on the file length
  202.          field and displayed on the screen.
  203.  
  204.  
  205.                    fsort  /-5  /+N10:5  /c  <data.in  data.out
  206.  
  207.          The contents of file data.in is sorted and written to file data.out.
  208.          The file is sorted in descending order on the key in columns 5 thru
  209.          9 and in ascending order on the numeric key in columns 10 thru 14.
  210.          The case of letters is ignored when comparing keys.
  211.  
  212.  
  213.                    fsort  /c  /u  data  data
  214.  
  215.          The input file is sorted and re-written back to the same file.  Any
  216.          duplicate records are discarded.  The case of letters is ignored
  217.          when comparing keys and testing for duplicates.
  218.  
  219.  
  220.  
  221.      3   OPERATIONAL DETAILS
  222.  
  223.      When you specify a key without a length (e.g. "/+5"), FSORT sorts the
  224.      file using the key starting at the specified column and extending to the
  225.      end of the line, or the beginning of another key, which ever comes
  226.      first.  When you specify a length explicitly (e.g. "/+5:10"), FSORT
  227.      looks only at the key characters specified.  There's no problem if you
  228.      specify a key that extends past the end of a line; FSORT treats the
  229.      missing characters as if they are less than characters that are present
  230.      in a longer line.
  231.  
  232.      When you specify a numeric key (with the "N" option), FSORT interprets
  233.      the digits "1" through "9", an optional leading sign ("+" or "-"), and
  234.      an optional decimal point (".") as a number, and then sorts using the
  235.      number.  FSORT ignores any leading spaces or tabs, and stops when it
  236.      finds a character that can't be part of a number.  FSORT also accepts
  237.      numbers in scientific notation, e.g. 5.9E-5 (which is equivalent to
  238.      0.000059).
  239.  
  240.      When you specify more than one key specification (e.g. "/+20 /+5:8"),
  241.      FSORT uses the first specification (the "/+20") to determine the order.
  242.      If the keys are equal, FSORT then looks at the second (i.e. "/+5:8")
  243.      specification, and continues looking at additional specifications until
  244.      unequal keys are found or all specifications are checked.
  245.  
  246.      If FSORT finds two lines with equal keys, it keeps their original order
  247.      in the sorted file.
  248.  
  249.      Keys are compared in ASCII order.  Control characters (e.g. tabs) aren't
  250.      expanded before comparing, so you should be careful when comparing lines
  251.      containing these characters.
  252.  
  253.      FSORT has been successfully tested on three networks: Novell's Netware
  254.      and Netware Lite, and Digital Equipment Corporation's Pathworks.  The
  255.      only problem occurs with Pathworks: files with some VMS Record Formats,
  256.      e.g. Variable, cannot be sorted.  The Stream Record Format works fine.
  257.  
  258.      FSORT assumes that the resources it uses (i.e. disk space, file handles,
  259.      and memory) don't vary while it runs.  If you run another program (e.g.
  260.  
  261.                                       - 4 -
  262.  
  263.  
  264.      a TSR) that consumes any of these resources while FSORT is running,
  265.      FSORT may malfunction.
  266.  
  267.  
  268.  
  269.      4   LICENSING, WARRANTY, REGISTRATION, AND SUPPORT
  270.  
  271.      FSORT is distributed as shareware.  I encourage you to try the program
  272.      and share it with friends as long as:
  273.  
  274.          1.  The FSORT program, this documentation, and any other FSORT files
  275.              are not modified and are distributed together.
  276.  
  277.          2.  FSORT is not provided as a part of any other product.
  278.  
  279.          3.  No fees, beyond a reasonable fee for media, duplication, or
  280.              downloading costs, are charged.
  281.  
  282.          4.  FSORT is not used for commercial, government, or business
  283.              purposes without registration.  Each registration is for a
  284.              single person or a single computer.
  285.  
  286.  
  287.      If you decide to use FSORT regularly you are required to register.  All
  288.      proceeds from FSORT are directed to Oxfam America, an international
  289.      self-help and disaster relief organization that I've supported for many
  290.      years.  You can find more about Oxfam by reading section 5.  If you
  291.      register you get the satisfaction of saving lives in Africa, Asia, and
  292.      South America, and encourage me to produce more software at reasonable
  293.      prices.  You also get the following benefits:
  294.  
  295.          I'll answer questions on FSORT and its use.  You can contact me at
  296.          the address shown below or via CompuServe mail.
  297.  
  298.          I'll make an attempt (but no guarantee!) to fix any problems you
  299.          find.
  300.  
  301.          If any important bugs are found I will notify you.
  302.  
  303.          I'll send an updated version of FSORT to you at no additional cost.
  304.          You can request this when I notify you of a new version, when I've
  305.          fixed a bug you have found, or any other time.  I'll only do this
  306.          once per registered user.
  307.  
  308.  
  309.      Registration is $25.  Please make your check payable to Oxfam America -
  310.      I'll send your checks to Oxfam and record your registration information.
  311.      I'll also accept original canceled checks or receipts from Oxfam that
  312.      list you as the donor.  Please send payments, registration information,
  313.      and any other correspondence to:
  314.  
  315.                 Mike Albert
  316.                 P. O. Box 535
  317.                 Bedford, MA   01730
  318.  
  319.      I can also be reached via CompuServe mail; my userid is [70325,1134].
  320.  
  321.      Anyone can order the latest version of FSORT directly from me for a fee
  322.      of $5.00.  Just send the order (make sure it contains your mailing
  323.      address) with your check to the above address.  You'll receive a 5 1/4
  324.      inch 360K floppy disk containing the FSORT executable and documentation
  325.  
  326.                                       - 5 -
  327.  
  328.  
  329.      files.  If you need other formats (5 1/4 inch 1.2Mb or 3 1/2 inch 720Kb
  330.      or 1.44Mb) I can provide them.  If you live outside North America,
  331.      please send extra money for the increased postage.
  332.  
  333.      I welcome all comments and suggestions concerning FSORT.  I'd like to
  334.      know how you are using FSORT and what problems, bugs, or weaknesses you
  335.      find.  If you tell me about enhancements or changes you're interested
  336.      in, I'll make an effort to provide them.  I'll also include other
  337.      shareware products I produce.  I'd also like to know what other products
  338.      you would like to see.
  339.  
  340.      This program is provided "as is" without warranty of any kind, either
  341.      express or implied, but not limited to the implied warranties of
  342.      merchantability or fitness for a particular purpose.  The entire risk as
  343.      to the results and performance of the program is assumed by the user.
  344.      Should the program prove defective, the user assumes the entire cost of
  345.      all necessary servicing, repair, or correction.
  346.  
  347.  
  348.  
  349.      5   OXFAM AMERICA
  350.  
  351.      As stated in Oxfam literature,
  352.  
  353.          "Oxfam America is an international agency that funds self-help
  354.          development projects and disaster relief in poor countries in
  355.          Africa, Asia, and Latin America, and also prepares and distributes
  356.          educational materials for people in the United States on the issues
  357.          of development and hunger.  The name "Oxfam" comes from the Oxford
  358.          Committee for Famine Relief, founded in England in 1942.  Oxfam
  359.          America, based in Boston, was formed in 1970, and is one of seven
  360.          autonomous Oxfams around the world (Great Britain, Australia,
  361.          Belgium, Canada, Quebec, Hong Kong and the United States).  Oxfam is
  362.          a nonsectarian, nonprofit agency that neither seeks or accepts U.S.
  363.          government funds.  All contributions are tax-deductible to the
  364.          extent permitted by law."
  365.  
  366.      For more information, you can phone Oxfam at 617-482-1211, or write to
  367.      them at:
  368.  
  369.                   Oxfam America
  370.                   26 West Street
  371.                   Boston, MA  02111-1206
  372.  
  373.  
  374.      6   ERROR MESSAGES
  375.  
  376.      FSORT displays an error message whenever it's invoked with arguments
  377.      that it can't process, or when problems occur that prevent it from
  378.      performing the requested work.  This section lists all the messages that
  379.      FSORT displays, as well as a description of what each message means and
  380.      what to do to correct the problem.  If you have any problems that you
  381.      can't correct, please contact FSORT support as described in section 4.
  382.  
  383.          FSORT error: column of key "<key>" is to big; limit is <n>.
  384.              FSORT only sorts lines up to <n> characters long, so you can't
  385.              specify a key that starts after that.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                                       - 6 -
  392.  
  393.  
  394.          FSORT error: couldn't create work file <fn>; <reason>.
  395.          FSORT error: couldn't create output file <fn>; <reason>.
  396.              FSORT was unable to create the work file <fn> or final output
  397.              file because of the problem stated in <reason>.  You can
  398.              probably guess what the problem is by looking at the location of
  399.              the file specified in <fn> and the problem description.  This
  400.              usually occurs because the work file location specified in the
  401.              FSTEMP, TEMP, or TMP MS-DOS environment variable is incorrect.
  402.              You can examine these variables by typing "set" at the MS-DOS
  403.              prompt.  Whichever variable you have should specify one or more
  404.              paths where work files can be placed.  This message also occurs
  405.              when the work file is on a network drive, and you don't have the
  406.              necessary rights to create a file in that directory and drive.
  407.  
  408.          FSORT error: couldn't open input file; <reason>.
  409.              FSORT couldn't the input file you specified on the command line
  410.              because of the problem stated in <reason>.  You can usually
  411.              figure out what's wrong by examining the problem description.
  412.              The most likely problem is that the input file name is specified
  413.              incorrectly.
  414.  
  415.          FSORT error: couldn't open enough files concurrently.
  416.              FSORT couldn't open enough files at once to perform the sort.
  417.              Since FSORT can sort with only three files open at once (even
  418.              though it's not very efficient), this message usually indicates
  419.              that you've done something to lower the number.  If you have
  420.              other programs running (e.g. TSRs, MS-Windows) that keep files
  421.              open, unload them.  You can also alter the FILES statement in
  422.              your config.sys file to increase the number.
  423.  
  424.          FSORT error: couldn't allocate memory for I/O buffer.
  425.          FSORT error: couldn't allocate memory for input buffer.
  426.          FSORT error: couldn't allocate memory for line buffer.
  427.          FSORT error: couldn't allocate memory for output buffer.
  428.          FSORT error: couldn't allocate memory for priority queue.
  429.              FSORT ran out of memory when trying to sort.  FSORT needs about
  430.              150K to sort at all, and more to sort large files efficiently.
  431.              If you run FSORT from the MS-DOS window of another program, try
  432.              unloading the program and then running FSORT directly from the
  433.              MS-DOS prompt.  If you load TSRs that use large amounts of
  434.              memory, try removing them.
  435.  
  436.          FSORT error: error closing file <fn>; <reason>.
  437.          FSORT error: error reading file <fn>; <reason>.
  438.          FSORT error: error writing file <fn>; <reason>.
  439.  
  440.              FSORT was unable to close, read, or write file <fn> because of
  441.              <reason>.  This error is usually caused by an unrecoverable I/O
  442.              error as described in <reason>.  The problem causing the error
  443.              must be corrected.
  444.  
  445.          FSORT error: insufficient disk space for output file.
  446.              There isn't enough space on your disk for the output file.  You
  447.              can correct this problem by deleting unneeded files on the
  448.              output drive, or specifying a different output drive that has
  449.              more space.  In some cases FSORT must put work files on the same
  450.              drive as the output file; when this occurs, freeing space on
  451.              other drives will also help.  You may also have lost some
  452.              sectors on your disk; these can be recovered by running the MS-
  453.              DOS program "chkdsk" with the "/f" option.  As a last resort, if
  454.              you don't need the unsorted file, you can specify the same file
  455.  
  456.                                       - 7 -
  457.  
  458.  
  459.              name for both input and output so that FSORT will overwrite the
  460.              input file.  But be aware that you run the risk of loosing your
  461.              data if something goes wrong.
  462.  
  463.          FSORT error: insufficient disk space for work file.
  464.              There isn't enough space on your disk for the needed work files.
  465.              You can correct this problem by deleting unneeded files on any
  466.              of your hard drives.  You may also have lost some clusters on
  467.              your disk; these can be recovered by running the MS-DOS program
  468.              "chkdsk" with the "/f" option.  If you don't need the input file
  469.              after the sort, you can specify the same file name for both
  470.              input and output so that FSORT will overwrite the input file.
  471.              But be aware that you run the risk of loosing your data if
  472.              something goes wrong.
  473.  
  474.          FSORT error: key "<key>" exceeds limit of <n> keys.
  475.              FSORT only allows sorting with up to <n> keys.  The <key> key
  476.              exceeds that limit.
  477.  
  478.          FSORT error: key "<key>" extends into column <n>; limit is <m>.
  479.              FSORT only sorts lines up to <m> characters long, so you can't
  480.              specify a sort key that extends beyond that.  Your key <key>
  481.              extends to column <n>.
  482.  
  483.          FSORT error: key "<key>" has a starting column less than 1.
  484.              FSORT numbers the columns (i.e. characters) in each line
  485.              starting at 1, so each sort key starting value must be 1 or
  486.              more.  The <key> sort key has a value of zero.
  487.  
  488.          FSORT error: key "<key>" has a length less than 1.
  489.              Sort keys must be one or more characters long; you specified a
  490.              length of zero.
  491.  
  492.          FSORT error: key "<key>" is malformed.
  493.              Each sort key argument must have the form "/+n", "/-n", "/+n:m",
  494.              "/-n:m", "/+Nn", "/-Nn", "/+Nn:m", or "/-Nn:m" where n and m are
  495.              positive decimal numbers.  The key you specified isn't in this
  496.              form.  Examples of correct keys are "/+5", "/-8:3", "/+3:8".
  497.              Note that the double quote character isn't coded on the command
  498.              line; e.g. a sample use of FSORT is:
  499.                  fsort  /+5:5  /-10  infile  outfile
  500.  
  501.          FSORT error: keys "<key1>" and "<key2>" start in the same column.
  502.          FSORT error: keys "<key1>" and "<key1>" overlap in column <n>.
  503.              It doesn't make sense for sort keys to overlap, because FSORT
  504.              doesn't know how to sort the overlapping part.  You specified
  505.              two sort keys (<key1> and <key2>) that overlap in column <n>.
  506.  
  507.          FSORT error: line <n> is too long to sort; limit is <m>.
  508.              FSORT can only sort lines up to <m> characters long.  Line
  509.              number <n> exceeds that limit.
  510.  
  511.          FSORT error: no input file specified.
  512.              FSORT didn't find the name of a file to sort on the command
  513.              line.  You must specify the name of the file to be sorted.
  514.  
  515.          FSORT error: too many work files; limit is <n>.
  516.              FSORT needed to create more than <n> work files to sort your
  517.              file.  This occurs either because you have an extremely large
  518.              file to sort, or you have run FSORT with very little memory
  519.              available.  FSORT needs about 200K to sort at all, and more to
  520.  
  521.                                       - 8 -
  522.  
  523.  
  524.              sort large files efficiently.  If you run FSORT from the MS-DOS
  525.              window of another program, try unloading the program and then
  526.              running FSORT directly from the MS-DOS prompt.  If you load TSRs
  527.              that use large amounts of memory, try removing them.
  528.  
  529.          FSORT error: unable to get status of file.
  530.              FSORT was unable to obtain status information from MS-DOS about
  531.              a work file.  This error should not occur in normal operation.
  532.              If it does, please contact FSORT support as described in
  533.              section 4.
  534.  
  535.          FSORT error: unknown argument "<arg>".
  536.              FSORT couldn't recognize <arg> as either a file name or a valid
  537.              option.  Check the list of arguments that FSORT accepts to
  538.              determine what arguments you can use.  You can list the options
  539.              FSORT recognizes by typing "fsort ?".  Remember that each option
  540.              must start with a "/", e.g. "/C".  You may also have specified
  541.              too many file names.  You may specify either one input file, or
  542.              one input file and one output file.  Note that if you forget to
  543.              enter a "/" before an option, FSORT will interpret it as a file
  544.              name.
  545.  
  546.          FSORT error: unrecoverable I/O problem.
  547.              FSORT encountered a I/O error that could not be corrected.  This
  548.              is generally caused by a damaged disk.  You must correct the
  549.              problem causing the error before proceeding.
  550.  
  551.          FSORT error: user aborted program.
  552.              This message is displayed when you abort FSORT with Ctrl-C or
  553.              Ctrl-Break.
  554.  
  555.  
  556.  
  557.      7   REVISION HISTORY
  558.  
  559.          FSORT version 1.00 - 4/9/93
  560.  
  561.              Original program.
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.                                       - 9 -